Claude for Desktopで自作MCPを使う
from MCP serverを作る
Claude for Desktopが読み込むファイルを編集する
$ code ~/Library/Application\ Support/Claude/claude_desktop_config.json
作ったMCPがあるファイルの場所や実行方法を指定する
code:claude_desktop_config.json
{
"mcpServers": {
"echo": {
"command": "/Users/path/to/bin/bun",
"args": "run", "/Users/path/to/index.ts"
}
}
}
commandも絶対pathで指定しないと動かなかった
ファイルへのpathも絶対pathである必要があるっぽい
Claude for Desktopを再起動する
上手く行ってないとこういうエラーが出る
https://gyazo.com/1a29524d26d01c427c97a7df2b9301f8
うまくいくとトンカチマークが出る
https://gyazo.com/4006e30a182eb4ea5277d7d77ae9a67d
https://gyazo.com/ccc894e7cf0ea7000d7289bda911e84a
一発目だけコレが出るぽい
https://gyazo.com/c200a77f18944e53dee83365176ae2e5